<template>
  <el-dialog v-model="dialogVisible" title="新增" width="30%">
    <span>This is a message</span>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="onCancel">取消</el-button>
        <el-button type="primary" @click="onSubmit"> 提交 </el-button>
      </span>
    </template>
  </el-dialog>
</template>

<script setup>
const dialogVisible = ref(false)
const openDialog = () => {
  dialogVisible.value = true
}
// 取消
const onCancel = () => {}

// 提交
const onSubmit = () => {}

defineExpose({
  openDialog,
})
</script>

<style scoped></style>
